FROM adoptopenjdk/openjdk11
#从构建上下文目录中复制jar包及相关文件到新的一层的镜像内的位置

ENV TZ=Asia/Shanghai
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \
          && apt-get update \
          && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
          && apt-get install tzdata \
          && apt-get clean \
          && apt-get autoclean \
          && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY target/awesome-bpm.jar /app/awesome-bpm.jar
#指定启动端口
EXPOSE 8093
#在指定容器内启动程序及参数
ENV HEAP_SIZE="1G"
ENV JAVA_OPTS="-Xms$HEAP_SIZE -Xmx$HEAP_SIZE -XX:+UseG1GC -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -Djasypt.encryptor.password=awesome"

CMD java ${JAVA_OPTS} \
    -jar /app/awesome-bpm.jar --jasypt.encryptor.password=awesome
